﻿using ParkSaleForAdmin.Data;
using ParkSaleForAdmin.Foundation;

namespace ParkSaleForAdmin.FunctionWindow
{
    class OrderInfo
    {
        [DataToUI("订单号", false)]
        public string id
        {
            get;
            set;
        }
        [DataToUI("下单人")]
        public string belong
        {
            get;
            set;
        }
        [DataToUI("小区地址")]
        public string address
        {
            get;
            set;
        }
        [DataToUI("车位号")]
        public string number
        {
            get;
            set;
        }
        [DataToUI("订单时间", false)]
        public string time
        {
            get;
            set;
        }
        [DataToUI("订单状态 1.订单交易成功 -1.订单关闭 0.订单审核")]
        public string status
        {
            get;
            set;
        }
        [DataToUI("销售者")]
        public string seller
        {
            get;
            set;
        }
        [DataToUI("成交价")]
        public string price
        {
            get;
            set;
        }

    }
    class Order : BasicManagerWindow<OrderInfo>
    {
        public Order()
        {
            add.IsEnabled = false;
            delete.IsEnabled = false;

            inputbox.Visibility = System.Windows.Visibility.Collapsed;
        }
        public override string TableName => "Order";

        public override string AppendStr(OrderInfo obj)
        {
            return SQLHelpler.MakeSelectStr(TableName, "id", "9999999999999999999999999");
        }

        public override string ChangeStr(OrderInfo obj)
        {
            return SQLHelpler.MakeSelectStr(TableName, "id", obj.id);
        }

        public override string DeleteStr(OrderInfo obj)
        {
            return SQLHelpler.MakeSelectStr(TableName, "id", obj.id);
        }
    }
}
